/**
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 *
 * Copyright (c) 2008-2009 WURFL-Pro srl
 */
package net.sourceforge.wurfl.core.handlers.classifiers;


/**
 * Filter interface.
 * <p>
 * This is responsible to classify devices based to user-agent.
 * </p>
 * 
 * @author WURFL-PRO SRL, Rome, Italy
 * @version $Id: Filter.java 1045 2009-03-09 15:52:53Z filippo.deluca $
 */
public interface Filter {

	/**
	 * It returns if this class can classify the given user-agent.
	 * 
	 * @param userAgent
	 *            The user-agent to probr.
	 * @return True if this classifier can handle <code>userAgent</code>.
	 */
	boolean canHandle(String userAgent);

	/**
	 * Classify the given deviceId with corresponding user-agent.
	 * 
	 * @param userAgent
	 *            The user-agent to classify.
	 * @param deviceID
	 *            The device identifier corresponding to given user-agent.
	 */
	void filter(String userAgent, String deviceID);
	
	/**
	 * Returns collected {@link FilteredDevices}.
	 */
	FilteredDevices getFilteredDevices();

}
